package com.siao.example.loading.state
{
	import com.siao.example.common.controller.ApplicationSwitchController;
	import com.siao.example.loading.controller.AssetsLoadController;
	import com.siao.example.loading.model.AssetsLoadModel;
	import com.siao.example.loading.view.AssetsLoadView;
	import com.siao.mvc.State;
	
	/**
	 * 加载状态
	 * @author SiaoLeon
	 */
	public class LoadingState extends State
	{
		// -------------------------------------------------------------------------------------------------------- 静态常量
		
		// -------------------------------------------------------------------------------------------------------- 静态变量
		
		// -------------------------------------------------------------------------------------------------------- 静态方法
		
		// -------------------------------------------------------------------------------------------------------- 静态函数
		
		// -------------------------------------------------------------------------------------------------------- 属性
		
		public var view:AssetsLoadView;
		
		// -------------------------------------------------------------------------------------------------------- 变量
		
		// -------------------------------------------------------------------------------------------------------- 构造
		
		/**
		 * 构造函数
		 */
		public function LoadingState(key:Object=null)
		{
			super(key);
		}
		
		// -------------------------------------------------------------------------------------------------------- 方法
		
		override public function onInit():void
		{
			this.view = new AssetsLoadView();
		}
		
		override public function onEnter():void
		{
			this.addModel(AssetsLoadModel);
			
			this.addView(this.view);
			
			this.addController(new ApplicationSwitchController());
			this.addController(new AssetsLoadController());
		}
		
		override public function onExit():void
		{
			super.onExit();
			
			this.view = null;
		}
	
		// -------------------------------------------------------------------------------------------------------- 函数
	
	}
}
